package router

import (
	"Infinichat_mixed/back/service"
	"Infinichat_mixed/docs"
	"github.com/gin-gonic/gin"
	swaggerfiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
)

func Router() *gin.Engine {
	r := gin.Default()
	docs.SwaggerInfo.BasePath = ""
	r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
	r.POST("/user/getUsers", service.GetUserList)
	r.POST("/user/userRegister", service.UserRegister)
	r.POST("/user/userLogin", service.UserLogin)
	r.POST("/user/UpdateUser", service.UpdateUser)
	return r
}
